Using an Imperative Language to Teach Applicative Methods

نویسندگان

  • Daniel Barrett
  • Robert Strandh
چکیده

Many universities teach traditional, imperative languages in their introductory programming courses, even though an applicative language may be preferable. In this paper, we present a compromise and show how applicative programming methods may be illustrated eeectively using a subset of Pascal. The approach focuses on order of evaluation, the if statement, functions, and recursion. We discuss several program examples actually given in class, and interesting problems encountered by students who had previous imperative programming experience. Although we are just beginning to investigate the results of our approach, we believe that we have been able to cut the time to explain Pascal syntax to a minimum, allowing more coverage of programming techniques.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Linda-based applicative and imperative process algebras

The classical algebraic approach to the speciication and veriication of concurrent systems is tuned to distributed programs taht rely on asynchronous communications and have explicit data exchange. An applicative process algebra, obtained by embedding the Linda primitives for interprocess communication in a CCS/CSP{like language, and an imperative one, obtained from the applicative variant by a...

متن کامل

An Extensional Metalanguage with I/o and a Dynamic Store (extended Abstract)

We introduce a typed metalanguage based on PCF that includes I/O and store operations. We give an applicative characterization of operational equivalence for this language. Finally, we give an example of a translation from an imperative programming language into our metalanguage, and we demonstrate how to use the theory of the metalanguage to reason about terms in the source programming language.

متن کامل

A Linear Applicative Solution for the Set Union Problem

This paper is about an applicative solution to the IMPERATIVE Set Union Problem, as posed by Peyton-Jones [3]. The adjectivisation is used here to emphasise that the problem was thought to pose significant questions in finding an applicative solution of the same order of complexity as the imperative version. We show one such solution, written in the style of KRC [5]. The same reasoning, when ap...

متن کامل

An Applicative Control-Flow Graph Based on Huet's Zipper

We are using ML to build a compiler that does low-level optimization. To support optimizations in classic imperative style, we built a control-flow graph using mutable pointers and other mutable state in the nodes. This decision proved unfortunate: the mutable flow graph was big and complex, and it led to many bugs. We have replaced it by a smaller, simpler, applicative flow graph based on Huet...

متن کامل

Value Types and Object Classes

Elements of the speciication and programming language ABEL are explained by examples. It is argued that a programming language should allow a maximum of programming detail to be expressed applicatively, h o w ever, imperative mechanisms are useful for controlling eeciency in terms of computation time and memory space, and expressing interactions with the computer environment a s w ell as concur...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007